/* Steps to use textured sprite
 *	1- Create by using constructor: SpriteTexture( param1, ...);
 *	2- LoadResource();
 *	3- Sprite is ready!
 *		Call GetTexture() to use texture in Render
 *		Call GetCurrentRect() to know what image is using.
 *		Next() method to go next image, auto check animation delay.
 */

#pragma once

#include <d3dx9.h>
#include "ISprite.h"

class SpriteTexture : public ISprite
{
private:
	/* Property */

	LPDIRECT3DTEXTURE9 texture;

	/* Functions */


	/* Constructor, Destructor */ 

public:
	/* Property */

	LPDIRECT3DTEXTURE9 GetTexture() { return this->texture;}

	/* Functions */

	// Load texture: 0 = OK; 1 = fail
	int LoadResource(void);


	/* Constructor, Destructor */ 

	// Create new tiled sprite from file with trans-color
	SpriteTexture(LPWSTR, LPDIRECT3DDEVICE9, D3DCOLOR); 

	SpriteTexture(void);
	~SpriteTexture(void);
};

